Conversation
| @@ -0,0 +1,11 @@ | |||
| function Test_Build-Tree{ | |||
Check warning
Code scanning / PSScriptAnalyzer
The cmdlet 'Test_Build-Tree' uses an unapproved verb. Warning
| @@ -0,0 +1,11 @@ | |||
| function Test_Build-Tree{ | |||
|
|
|||
Check notice
Code scanning / PSScriptAnalyzer
Line has trailing whitespace Note
| @@ -0,0 +1,103 @@ | |||
| function Build-Tree { | |||
Check notice
Code scanning / PSScriptAnalyzer
The cmdlet 'Build-Tree' does not have a help comment. Note
|
|
||
| $tree = Build-Node $hubbers $ceo | ||
|
|
||
| $global:hubbers = $hubbers |
Check warning
Code scanning / PSScriptAnalyzer
Found global variable 'global:hubbers'. Warning
| $tree = Build-Node $hubbers $ceo | ||
|
|
||
| $global:hubbers = $hubbers | ||
| $global:tree = $tree |
Check warning
Code scanning / PSScriptAnalyzer
Found global variable 'global:tree'. Warning
| $global:hubbers = $hubbers | ||
| $global:tree = $tree | ||
|
|
||
| return $hubbers, $tree |
Check notice
Code scanning / PSScriptAnalyzer
The cmdlet 'Build-Tree' returns an object of type 'System.Object[]' but this type is not declared in the OutputType attribute. Note
|
|
||
| try { | ||
|
|
||
| Write-Host "." -NoNewline |
Check warning
Code scanning / PSScriptAnalyzer
File 'buildTree.ps1' uses Write-Host. Avoid using Write-Host because it might not work in all hosts, does not work when there is no host, and (prior to PS 5.0) cannot be suppressed, captured, or redirected. Instead, use Write-Output, Write-Verbose, or Write-Information. Warning
|
|
||
| $Node.employees.$elogin = Build-Node $hubbers $employee | ||
| } | ||
|
|
Check notice
Code scanning / PSScriptAnalyzer
Line has trailing whitespace Note
| function Test-Continue() { | ||
|
|
||
| $max = 5000 | ||
|
|
Check notice
Code scanning / PSScriptAnalyzer
Line has trailing whitespace Note
Introduce the Build-Tree function to construct a hierarchical representation of employees and their managers. Enhance the Get-Hubber function to optionally return hubbers as a hashtable. Include tests to validate the functionality of the new features.